package com.ticket.dao.impl;

import com.ticket.dao.HallDao;
import com.ticket.entity.Hall;
import com.ticket.util.Page;

import java.util.List;

/**
 * @author 86131
 * @version 8.0
 * @description TODO
 * @date 2023/10/8
 */
public class HallDaoImpl implements HallDao {
    //CommonDao dao = new CommonDao();


    /*public Page<Hall> showHall(Page page, Hall hall) {
        Page<Hall> hallPage=new Page(page.getPageSize(), page.getCurrPageNo());
        String numsql="select count(1) movie_hall";
        String sql="select * from movie_hall";
        try {
           // hallPage = dao.exeQueryPage(Hall.class,page,numsql,sql,hall);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return hallPage;
    }*/

    @Override
    public int selHallPageCount() {
        return 0;
    }

    @Override
    public List<Hall> showHallpage(Page page, Hall hall) {
        return null;
    }


    @Override
    public int addHall(Hall hall) {
        String sql="insert into movie_hall values(default,#{hall_name},#{cinema_id},#{cinema_status})";
        //int num=dao.exeUpdate(sql,hall);
        return 0;
    }

    @Override
    public int updHall(Hall hall) {
        String sql="update movie_hall set hall_name=#{hall_name},cinema_id=#{cinema_id}," +
                "cinema_status=#{cinema_status} where hall_id=#{hall_id}";
        //int num= dao.exeUpdate(sql,hall);
        return 0;
    }

    @Override
    public int delHall(Hall hall) {
        String sql="delete from movie_hall where hall_id=#{hall_id}";
        //int num= dao.exeUpdate(sql,hall);
        return 0;
    }

    /**
    * @author WangLingJuan
    * @description TODO 查询影厅名称
    * @date 2023-10-08 11:44
     * @param
    * @return com.ticket.entity.Hall
    */

    @Override
    public List<Hall> selHallName(Hall hall) {
        String sql="select hall_name from movie_hall";
        //List<Hall> hallList = dao.exeQuery(Hall.class,sql,null);
        return null;
    }

}
